package logic

import (
	"context"
	"srv/model/es"

	"srv/internal/svc"
	"srv/srv"

	"github.com/zeromicro/go-zero/core/logx"
)

type EsFindLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewEsFindLogic(ctx context.Context, svcCtx *svc.ServiceContext) *EsFindLogic {
	return &EsFindLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

func (l *EsFindLogic) EsFind(in *srv.EsFindRequest) (*srv.EsFindResponse, error) {
	// todo: add your logic here and delete this line

	good := es.EsFind(in.GoodName)

	return &srv.EsFindResponse{
		List: good,
	}, nil
}
